<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>买入股票</title>

    <link rel="stylesheet" href="angularjs/pagination.css">
    <!--3.引入Layer样式； -->
    <link rel="stylesheet" href="layer/layer/theme/default/layer.css">
    <!--5.引入angularJS框架-->
    <script src="angularjs/angular.min.js"></script>
    <!--7.写自己的js-->
    <script>
        //定义一个模块 叫 buyApp
        var app = angular.module("buyApp", []);
        app.controller("myCtrl", function ($scope, $http) {

            //1.查询一支股票
            $scope.getStock = function () {
                // 1 得到股票的名称
                // alert($scope.BuyEntrust.stockEntrustCode);
                $http.post("/trad/stock/getStock", $scope.BuyEntrust.stockEntrustCode).success(function (data) {
                    $scope.BuyEntrust.stockEntrustCompany = data.data.stockCompany;
                    $scope.BuyEntrust.stockEntrustOperate = "买入";
                    $scope.BuyEntrust.stockEntrustStockid = data.data.stockId;
                });
                // 2 得到股票的 高开低收 和最新的价格
                $http.post("/trad/stock/getOneOhcl", $scope.BuyEntrust.stockEntrustCode).success(function (data1) {
                    $scope.BuyEntrust.stockEntrustMoney = data1.data.stockNewprice;     //股票最新价格
                    $scope.BuyEntrust.stockEntrustUserid = $.cookie("stock_user_id");
                    // 3. 算出 可买股票的数量
                    $http.post("/trad/getAmount", $scope.BuyEntrust).success(function (data2) {
                        $scope.BuyEntrust.stockEntrustAmount = data2.data;
                    });
                    $http.post("/trad/stock/getOnePoint", $scope.BuyEntrust.stockEntrustCode).success(function (point) {
                        $scope.BuyEntrust.stockRMax = point.data.stockRMax;
                        $scope.BuyEntrust.stockFMix = point.data.stockFMix;

                    })
                });
                $scope.marketInit("sz" + $scope.BuyEntrust.stockEntrustCode);
            }

            // 2.查询可买数量
            $scope.getAmount = function () {
                $scope.BuyEntrust.stockEntrustUserid = $.cookie("stock_user_id");
                $http.post("/trad/getAmount", $scope.BuyEntrust).success(function (dataforAmount) {
                    if ($scope.BuyEntrust.stockEntrustMoney>$scope.stockRMax || $scope.BuyEntrust.stockEntrustMoney<$scope.stockFMix) {
                        layer.msg("错误: 买入价格输入错误! 必须在涨停价至跌停价格范围内!",{icon:5});
                        $scope.BuyEntrust.stockEntrustMoney = null;       //将买入金额   清空
                        $scope.BuyEntrust.stockEntrustAmount = null;      //将可买股     清空  因为 dataforAmount.data就是0
                        $scope.Warning = "错误: 买入价格输入错误! 必须在涨停价至跌停价格范围内!";               //设置一个提示信息.显示在买入价格后面.
                        $scope.BuyEntrust.stockEntrustNum = null;               //将买入数量   清空
                    }else {
                        // 买入价格输入正确
                        $scope.BuyEntrust.stockEntrustAmount = dataforAmount.data;
                        $scope.Warning = null;
                    }
                })
            }

            // 3.查询 一支股票的最新价格 newPrice
            $scope.getNewPrice = function (stockEntrustCode) {
                $scope.post("").success(function (data) {

                })
            }

            // 4. 点击了重填按钮
            $scope.cleanAll = function () {

                 $scope.clean11();
                 layer.msg("清空数据成功!",{icon:6})

            };

            //4.1 清空数据
            $scope.clean11 = function(){
                $scope.BuyEntrust = null;
                $scope.stockEntrustCompany = null;
                $scope.Warning = null;
                $scope.stockEntrustAmount = null;
                $scope.stockEntrustMoney = null;
            };


            // 5. 点击购买  (存储入委托)
            $scope.buyToEntrust = function () {
                if ($("#stCode").val() == "") {
                    layer.msg("股票代码不能为空!",{icon:5});
                    $("#myModal").modal("hide");
                }
                if ($("#stPrice").val() == "") {
                    layer.msg("购买价格不能为空!",{icon:5});
                    $("#myModal").modal("hide");
                }
                if ($("#stNumber").val() == "") {
                    layer.msg("购买数量不能为空!",{icon:5});
                    $("#myModal").modal("hide");
                }
                $scope.BuyEntrust.stockEntrustUserid = $.cookie("stock_user_id");
                $http.post("/trad/buy/addEntrust", $scope.BuyEntrust).success(function (dataforbuy) {
                    console.log(dataforbuy);
                    if(dataforbuy.code==444){
                        layer.msg(dataforbuy.msg,{icon:5});
                        $scope.clean11();
                    }else{
                        layer.msg(dataforbuy.msg,{icon:6});
                        $("#myModal").modal("hide");
                        $scope.clean11();
                        setTimeout(function () {location.href = "weituo.html";}, 1500)
                    }

                })
            };

            //6. 买入数量 的判断.(不能大于可买数量)
            $scope.getNum = function () {
                if (!($scope.BuyEntrust.stockEntrustNum % 100 == 0)) {
                    layer.msg("错误 :  买入数量必须是整百数!",{icon:5});
                    $scope.WarningForNum = "买入数量必须是整百数!";
                    $scope.BuyEntrust.stockEntrustNum = null;
                } else {
                    $scope.BuyEntrust.stockEntrustUserid = $.cookie("stock_user_id");
                    $http.post("/trad/getNum", $scope.BuyEntrust).success(function (dataforNum) {
                        $scope.WarningForNum = dataforNum.data;
                        if (dataforNum.code == 444) {
                            $scope.BuyEntrust.stockEntrustNum = null;
                        }
                    })
                }

            }

          /*  $scope.getAll = function () {
                /!*查询所有委托信息*!/
                $http.post("/trad/showE",$scope.BuyEntrust).success(function (data) {
                    $scope.list = data.data;
                })
            }*/

            //7. 买卖盘信息获取

            $scope.marketInit = function (stockCode) {
                $http.post("/cli/stock/pageInit?stockCode=" + stockCode).success(function (data) {
                    $scope.pageCompany = data.data[0].stockCompany;
                    $scope.pageCode = data.data[0].stockCode;
                    $scope.stockTotalprice = data.data[0].stockTotalprice;
                    $scope.stockTurnover = data.data[0].stockTurnover;
                    $scope.stockUpanddowns = data.data[0].stockUpanddowns;
                    $scope.stockVolume = data.data[0].stockVolume;
                    $scope.stockNewprice = data.data[1].stockNewprice;
                    $scope.stockRMax = data.data[2].stockRMax;
                    $scope.stockFMix = data.data[2].stockFMix;
                });
                $scope.bosInit(stockCode);
            };




            $scope.bosInit = function (stockCode) {
                $http.post("/trad/bos/getfive?code=" + stockCode + "&type=买入").success(function (data) {
                    $scope.bfive = data.data;
                });
                $http.post("/trad/bos/getfive?code=" + stockCode + "&type=卖出").success(function (data) {
                    $scope.sfive = data.data;
                });
            };
            //删除uid的cookie
            $scope.delCookie = function () {
                $.removeCookie('stock_user_id',{ path: '/'});
                $.removeCookie("stock_user_role",{path:'/'});
            }
        });
    </script>


    <!-- 此模块自定义字体 -->
    <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
          rel="stylesheet">

    <!-- 此模块自定义风格 -->
    <link href="css/sb-admin-2.min.css" rel="stylesheet">

    <!-- 此页面自定义风格 -->
    <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">

</head>

<body id="page-top" ng-app="buyApp" ng-controller="myCtrl">

<!-- 页面包装 -->
<div id="wrapper">

    <!-- 侧边栏开始 -->
    <ul class="navbar-nav bg-gray-800 sidebar sidebar-dark accordion" id="accordionSidebar">

        <!-- 公司logo与公司名区域 -->
        <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
            <div class="sidebar-brand-icon rotate-n-15">
                <i class="fas fa-laugh-wink"></i>
            </div>
            <div class="sidebar-brand-text mx-3">金正股份<sup>TM</sup></div>
        </a>

        <!-- 分割线 -->
        <hr class="sidebar-divider my-0">

        <!-- 首页模块 -->
        <li class="nav-item active">
            <a class="nav-link" href="index.html">
                <i class="fas fa-fw fa-tachometer-alt"></i>
                <span>首页</span></a>
        </li>

        <!-- 分割线 -->
        <hr class="sidebar-divider">

        <!-- 股票行情头标题 -->
        <div class="sidebar-heading">
            股票市场
        </div>

        <!-- 热门股票模块 -->
        <li class="nav-item">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseTwo"
               aria-expanded="true" aria-controls="collapseTwo">

                <i class="fas fa-fire fa-cog"></i>

                <span>热门股票</span>
            </a>
<!--            <div id="collapseTwo" class="collapse" aria-labelledby="headingTwo" data-parent="#accordionSidebar">
                <div class="bg-white py-2 collapse-inner rounded">
                    <h6 class="collapse-header">Custom Components:</h6>
                    <a class="collapse-item" href="buttons.html">Buttons</a>
                    <a class="collapse-item" href="cards.html">Cards</a>
                </div>
            </div>-->
        </li>

        <!-- 股票行情模块 -->
        <li class="nav-item">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapseUtilities"
               aria-expanded="true" aria-controls="collapseUtilities">
                <i class="fas fa-fw fa-chart-area"></i>
                <span>股票行情</span>
            </a>
<!--            <div id="collapseUtilities" class="collapse" aria-labelledby="headingUtilities"
                 data-parent="#accordionSidebar">
                <div class="bg-white py-2 collapse-inner rounded">
                    <h6 class="collapse-header">Custom Utilities:</h6>
                    <a class="collapse-item" href="market_K.html">K线图</a>
                    <a class="collapse-item" href="utilities-color.html">Colors</a>
                    <a class="collapse-item" href="utilities-border.html">Borders</a>
                    <a class="collapse-item" href="utilities-animation.html">Animations</a>
                    <a class="collapse-item" href="utilities-other.html">Other</a>
                </div>
            </div>-->
        </li>

        <!-- 分割线 -->
        <hr class="sidebar-divider">

        <!-- 交易系统头标题 -->
        <div class="sidebar-heading">
            交易中心
        </div>

        <!-- 股票买入模块 -->

        <li class="nav-item">
            <a class="nav-link" href="buy.html">
                <i class="fas fa-dollar-sign fa-2x"></i>
                <span>股票买入</span></a>
        </li>

        <!-- 股票卖出模块 -->
        <li class="nav-item">
            <a class="nav-link" href="maichu.html">
                <i class="fas fa-outdent"></i>
                <span>股票卖出</span></a>
        </li>

        <!-- 股票撤销模块 -->
        <li class="nav-item">
            <a class="nav-link" href="chedan.html">
                <i class="fas fa-window-close fa-table"></i>
                <span>股票撤销</span></a>
        </li>
        <!-- 分割线 -->
        <hr class="sidebar-divider bg-gray-800">
        <!--用户中心模块-->
        <div class="sidebar-heading">
            用户中心
        </div>
        <!-- 个人股票模块 -->
        <li class="nav-item">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#collapsePages"
               aria-expanded="true" aria-controls="collapsePages">
                <i class="fas fa-warehouse fa-folder"></i>
                <span>我的股票</span>
            </a>
            <div id="collapsePages" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
                <div class="bg-gray-200 py-2 collapse-inner rounded">
                    <h6 class="collapse-header" style="color:gray">股仓</h6>
                    <a class="collapse-item" href="pos.html"> <i class="fas fa-arrow-right"></i>持仓</a>
                    <a class="collapse-item" href="chengjiao.html"> <i class="fas fa-arrow-right"></i>成交</a>
                    <a class="collapse-item" href="weituo.html"> <i class="fas fa-arrow-right"></i>委托</a>
                </div>
            </div>
        </li>
        <!-- 个人中心模块 -->
        <li class="nav-item">
            <a class="nav-link collapsed" href="#" data-toggle="collapse" data-target="#center" aria-expanded="true" aria-controls="center">
                <i class="fas fa-user-astronaut fa-folder"></i>
                <span>个人中心</span>
            </a>
            <div id="center" class="collapse" aria-labelledby="headingPages" data-parent="#accordionSidebar">
                <div class="bg-gray-200 py-2 collapse-inner rounded">
                    <a class="collapse-item" href="setting.html"> <i class="fas fa-user-cog">&nbsp;</i>设置</a>
                    <a class="collapse-item" href="wallet.html"> <i class="fas fa-wallet">&nbsp;</i>钱包</a>
                </div>
            </div>
        </li>
        <!-- Divider -->
        <hr class="sidebar-divider d-none d-md-block">

        <!-- Sidebar Toggler (Sidebar) -->
        <div class="text-center d-none d-md-inline">
            <button class="rounded-circle border-0" id="sidebarToggle"></button>
        </div>

    </ul>
    <!-- 侧边栏结束 -->

    <!-- 内容包装开始 -->
    <div id="content-wrapper" class="d-flex flex-column">

        <!-- 主内容开始 -->
        <div id="content" ng-app="buyApp" ng-controller="myCtrl" ng-init="getAll()">

            <!-- 顶栏开始 -->
            <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

                <!-- Sidebar Toggle (Topbar) -->
                <form class="form-inline">
                    <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
                        <i class="fa fa-bars"></i>
                    </button>
                </form>

                <!--
                          &lt;!&ndash; Topbar Search &ndash;&gt;
                          <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
                            <div class="input-group">
                              <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                              <div class="input-group-append">
                                <button class="btn btn-primary" type="button">
                                  <i class="fas fa-search fa-sm"></i>
                                </button>
                              </div>
                            </div>
                          </form>
                -->

                <!-- Topbar Navbar -->
                <ul class="navbar-nav ml-auto">

                    <!-- Nav Item - Search Dropdown (Visible Only XS) -->
                    <li class="nav-item dropdown no-arrow d-sm-none">
                        <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fas fa-search fa-fw"></i>
                        </a>
                        <!-- Dropdown - Messages -->
                        <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
                            <form class="form-inline mr-auto w-100 navbar-search">
                                <div class="input-group">
                                    <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                                    <div class="input-group-append">
                                        <button class="btn btn-primary" type="button">
                                            <i class="fas fa-search fa-sm"></i>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </li>
                    <!-- 个人中心模块 -->
                    <li class="nav-item dropdown no-arrow">
                        <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <span class="mr-2 d-none d-lg-inline text-gray-600 small">我的账户</span>
                            <img class="img-profile rounded-circle" src="img/headpic.jpg">
                        </a>
                        <!-- Dropdown - User Information -->
                        <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                            <a class="dropdown-item" href="openAccount.html">
                                <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                                开户
                            </a>
                            <a class="dropdown-item" href="login.html">
                                <i class="fas fa-user-circle fa-sm fa-fw mr-2 text-gray-400"></i>
                                登录
                            </a>
                            <a class="dropdown-item" href="register.html">
                                <i class="fas fa-user-plus fa-sm fa-fw mr-2 text-gray-400"></i>
                                注册
                            </a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                                <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                                退出登录
                            </a>
                        </div>
                    </li>

                </ul>

            </nav>
            <!-- 顶栏结束 -->

            <!-- 开始页面内容 -->
            <div class="container-fluid">

                <div class="row">

                    <!-- 买入股票 -->
                    <div class="col-xl-8 col-lg-7">
                        <div class="card shadow mb-4">
                            <!-- 头部 -->
                            <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                                <h6 class="m-0 font-weight-bold text-primary">买入股票</h6>
                            </div>
                            <div class="card-body">
                                <!-- 买入主要内容部分 -->
                                <div class="container">
                                    <div class="panel-heading ">
                                        <span style=" font-size: 24px; font-weight: bolder">买入股票</span>
                                    </div>
                                    <div class="panel panel-body">

                                        <span hidden>{{BuyEntrust}}</span>

                                        <table class="table table-hover">
                                            <tr style="border: 0px solid;height: 30px">
                                                <td></td>
                                                <td><span>股票代码</span></td>
                                                <td><input type="text"
                                                           maxlength="6"
                                                           style="font-size: 12px; height: 20px;width: 120px"
                                                           align="left"
                                                           ng-blur="getStock()"
                                                           ng-model="BuyEntrust.stockEntrustCode"
                                                           id="stCode"
                                                           ng-value=""
                                                ></td>
                                                <td style="width: 20%"></td>
                                            </tr>

                                            <tr>
                                                <td></td>
                                                <td><span>股票名称</span></td>
                                                <td><input
                                                        type="text" ;
                                                        style="border: 0px;outline: medium;font-size: 12px; height: 20px;width: 120px"
                                                        align="left" ;
                                                        placeholder={{BuyEntrust.stockEntrustCompany}}
                                                        ng-model="BuyEntrust.stockEntrustCompany"
                                                        id="stCompany"
                                                        readonly
                                                ></td>
                                                <td style="width: 20%"></td>
                                            </tr>

                                            <tr>
                                                <td style="width: 20%"></td>
                                                <td style="width: 20%"><span>买入价格</span></td>
                                                <td style=" width: 22%;"><input
                                                        type="text"
                                                        style="font-size: 12px; height: 20px;width: 120px" align="left"
                                                        ng-blur="getAmount()"
                                                        placeholder={{BuyEntrust.stockEntrustMoney}}
                                                        ng-model="BuyEntrust.stockEntrustMoney"
                                                        id="stPrice"
                                                ></td>
                                                <td style="width: 22%;color: red">{{Warning}}</td>
                                            </tr>


                                            <tr style="border: 0px solid;height: 30px;">
                                                <td style="width: 30%"></td>
                                                <td><span>可买数量(股)</span></td>
                                                <td><input
                                                        type="text"
                                                        style="border: 0px;outline: medium;font-size: 12px; height: 20px;width: 120px"
                                                        align="left"
                                                        placeholder={{BuyEntrust.stockEntrustAmount}}
                                                        id="stAmount"
                                                        readonly
                                                ></td>
                                                <td style="width: 20%"></td>
                                            </tr>


                                            <tr style="border: 0px solid;height: 30px;">
                                                <td></td>
                                                <td><span>买入数量</span></td>
                                                <td><input
                                                        type="text"
                                                        style="font-size: 12px; height: 20px;width: 120px" align="left"
                                                        ng-blur="getNum()"
                                                        ng-model="BuyEntrust.stockEntrustNum"
                                                        id="stNumber"
                                                ></td>
                                                <td style="width: 20%;color: red">
                                                    {{WarningForNum}}
                                                </td>
                                            </tr>
                                        </table>
                                        <div>
                                            <table class="table table-striped">
                                                <tr style="text-align: center">
                                                    <td>
                                                        <button type="submit" ng-click="cleanAll()"
                                                                class="btn btn-light btn-sm btn-dark">重填
                                                        </button>
                                                        &nbsp;&nbsp;&nbsp;
                                                        <!--<button type="submit" ng-click="open()" class="btn btn-light btn-sm btn-dark" >买入</button>-->
                                                        <button type="submit" data-toggle="modal" data-target="#myModal"
                                                                class="btn btn-light btn-sm btn-dark">买入
                                                        </button>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>

                                        <!-- 模态框（Modal）  二次确认 -->
                                        <div class="modal fade" id="myModal" tabindex="-1" role="dialog"
                                             aria-labelledby="myModalLabel" aria-hidden="true">
                                            <div class="modal-dialog" role="document">
                                                <div class="modal-content">
                                                    <div class="modal-header">
                                                        <h5 class="modal-title" id="myModalLabel"
                                                            style="font-weight: bolder">委托确认</h5>
                                                        <button class="close" type="button" data-dismiss="modal"
                                                                aria-label="Close">
                                                            <span aria-hidden="true">×</span>
                                                        </button>
                                                    </div>

                                                    <div class="modal-body">

                                                        <table class="table ">
                                                            <tr>
                                                                <td style="text-align: center">
                                                                    <img src="img/Buy.jpg">
                                                                </td>
                                                                <td>
                                                                    <table>
                                                                        <tr>
                                                                            <td>资金账号 :</td>
                                                                            <td>HU1213321</td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>证券代码 :</td>
                                                                            <td ID="code">
                                                                                {{BuyEntrust.stockEntrustCode}}({{BuyEntrust.stockEntrustCompany}})
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>买入价格 :</td>
                                                                            <td id="price">
                                                                                {{BuyEntrust.stockEntrustMoney}}
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>买入数量 :</td>
                                                                            <td id="number">
                                                                                {{BuyEntrust.stockEntrustNum}}
                                                                            </td>
                                                                        </tr>

                                                                        <tr>
                                                                            <td>预估金额 :</td>
                                                                            <td>
                                                                                {{BuyEntrust.stockEntrustMoney*BuyEntrust.stockEntrustNum}}
                                                                            </td>
                                                                        </tr>

                                                                        <tr>
                                                                            <td colspan="2"
                                                                                style="color:red; font-size: 16px ; font-weight: bolder">
                                                                                您是否确定以上买入的委托?
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>

                                                    </div>

                                                    <div class="modal-footer text-center">
                                                        <button type="button" id="save" ng-click="buyToEntrust()"
                                                                class="btn btn-warning" style="width: 20%">是
                                                        </button>
                                                        <button type="button" id="exit" data-dismiss="modal"
                                                                class="btn btn-dark" style="width: 20%">否
                                                        </button>
                                                    </div>
                                                </div><!-- /.modal-content -->
                                            </div><!-- /.modal -->
                                        </div><!-- modal End-->

                                    </div> <!--body END-->
                                </div><!--container END-->
                            </div>
                        </div>
                    </div>

                    <!-- 买盘卖盘 -->
                    <div class="col-xl-4 col-lg-5">
                        <div class="card shadow mb-4">
                            <!-- 买卖盘头部区域 -->
                            <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between ">
                                <h6 class="m-0 font-weight-bold text-primary">最新 ：<a
                                        class="ng-cloak">￥{{stockNewprice}}</a></h6>
                                <h6 class="m-0 font-weight-bold text-info ng-cloak">涨幅 ： <a class="ng-cloak">￥{{stockUpanddowns}}</a>
                                </h6>
                                <h6 class="m-0 font-weight-bold text-success ng-cloak">涨停 ：<a class="ng-cloak">￥{{stockRMax}}</a>
                                </h6>
                                <h6 class="m-0 font-weight-bold text-danger ng-cloak">跌停 ：<a class="ng-cloak">￥{{stockFMix}}</a>
                                </h6>
                                <div class="dropdown no-arrow">
                                </div>
                            </div>
                            <!-- 买卖盘信息区域 -->
                            <div class="card-body" style="height: 409px">
                                <div class="chart-area">
                                    <!--在要加的内容外面套上这样一个div ，可保持同行模板展示同步 class="chart-area"-->
                                    <div class="table-responsive" style="font-size: 14px;">
                                        <table class="table table-sm table-borderless text-center" id="dataTable"
                                               width="100%"
                                               cellspacing="0">
                                            <thead>
                                            <tr>
                                                <!--<th colspan="4">表头</th>-->
                                            </tr>
                                            </thead>

                                            <tbody style="color: orangered">
                                            <tr>
                                                <th>卖盘</th>
                                                <th>5</th>
                                                <th ng-bind="sfive[4].stockBSQuantity"></th>
                                                <th ng-bind="sfive[4].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>卖盘</th>
                                                <th>4</th>
                                                <th ng-bind="sfive[3].stockBSQuantity"></th>
                                                <th ng-bind="sfive[3].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>卖盘</th>
                                                <th>3</th>
                                                <th ng-bind="sfive[2].stockBSQuantity"></th>
                                                <th ng-bind="sfive[2].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>卖盘</th>
                                                <th>2</th>
                                                <th ng-bind="sfive[1].stockBSQuantity"></th>
                                                <th ng-bind="sfive[1].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>卖盘</th>
                                                <th>1</th>
                                                <th ng-bind="sfive[0].stockBSQuantity"></th>
                                                <th ng-bind="sfive[0].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th colspan="4">
                                                    <hr class="sidebar-divider my-0 bg-gradient-light">
                                                </th>
                                            </tr>
                                            </tbody>
                                            <tfoot style="color:green">
                                            <tr>
                                                <th>买盘</th>
                                                <th>1</th>
                                                <th ng-bind="bfive[0].stockBSQuantity"></th>
                                                <th ng-bind="bfive[0].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>买盘</th>
                                                <th>2</th>
                                                <th ng-bind="bfive[1].stockBSQuantity"></th>
                                                <th ng-bind="bfive[1].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>买盘</th>
                                                <th>3</th>
                                                <th ng-bind="bfive[2].stockBSQuantity"></th>
                                                <th ng-bind="bfive[2].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>买盘</th>
                                                <th>4</th>
                                                <th ng-bind="bfive[3].stockBSQuantity"></th>
                                                <th ng-bind="bfive[3].stockBSPrice"></th>
                                            </tr>
                                            <tr>
                                                <th>买盘</th>
                                                <th>5</th>
                                                <th ng-bind="bfive[4].stockBSQuantity"></th>
                                                <th ng-bind="bfive[4].stockBSPrice"></th>
                                            </tr>
                                            </tfoot>
                                        </table>
                                    </div>
                                </div>

                            </div>
                        </div>
                    </div>


                    <div class="col-xl-12 col-lg-12">
                        <!--<div class="container">-->
                       <!-- <div class="panel-heading ">
                            <span style="font-weight: bolder;font-size: 20px">委托信息</span>

                        </div>
                        <div class="panel-body">
                            <table class="table-bordered table-hover table-striped" width="100%" cellspacing="0"
                                   style="font-size: 12px">
                                <tr style="font-weight: bolder; font-size: 16px" class="text-primary">
                                    <th>委托时间</th>
                                    <th>证券代码</th>
                                    <th>证券名称</th>
                                    <th>操作</th>
                                    <th>备注</th>
                                    <th>委托数量</th>
                                    <th>成交数量</th>
                                    <th>委托价格</th>

                                </tr>
                                <tr ng-repeat="u in list">
                                    <th>{{u.stockEntrustTime}}</th>
                                    <th>{{u.stockEntrustCode}}</th>
                                    <th>{{u.stockEntrustCompany}}</th>
                                    <th>{{u.stockEntrustOperate}}</th>
                                    <th>{{u.stockEntrustStatus}}</th>
                                    <th>{{u.stockEntrustNum}}</th>
                                    <th>{{u.stockEntrustTransnum}}</th>
                                    <th>{{u.stockEntrustMoney}}</th>
                                </tr>
                            </table>
                            <div class="text-center">
                                <span style="font-size: 10px" class="text-center">(更多详细信息请进入<a
                                        href="">个人股票</a> 查看)</span>

                            </div>

                        </div>-->
                        <!--</div>-->
                        <div class="text-center">
                                <span style="font-size: 10px" class="text-center">( 更多详细信息请进入<a
                                        href="weituo.html">我的股票</a> 查看 )</span>

                        </div>
                    </div>
                </div>

            </div>
            <!-- 主内容结束 -->

        </div>
        <!-- 内容包装结束 -->

        <!-- 底部内容 -->
        <footer class="sticky-footer bg-white">
            <div class="container my-auto">
                <div class="copyright text-center my-auto">
                    <span>Copyright &copy; Your Website 2020</span>
                </div>
            </div>
        </footer>
        <!-- 底部内容结束 -->
    </div>
    <!-- 页面包装结束 -->
</div>

<!-- Scroll to Top Button-->
<a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
</a>

<!-- 退出登录 弹出 模态框区域 -->
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">确认要退出登录码?</h5>
                <button class="close" type="button" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">若确认退出.请点击下方->>退出<<-</div>
            <div class="modal-footer">
                <button class="btn btn-secondary" type="button" data-dismiss="modal">返回</button>
                <a class="btn btn-primary" ng-click="delCookie()" href="login.html">退出</a>
            </div>
        </div>
    </div>
</div>


<!-- Bootstrap core JavaScript-->
<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="bootstrap/js/jquery-cookie/jquery.cookie.js"></script>

<!-- Core plugin JavaScript-->
<script src="vendor/jquery-easing/jquery.easing.min.js"></script>

<!-- Custom scripts for all pages-->
<script src="js/sb-admin-2.min.js"></script>

<!-- Page level plugins -->
<script src="vendor/datatables/jquery.dataTables.min.js"></script>
<script src="vendor/datatables/dataTables.bootstrap4.min.js"></script>

<!-- Page level custom scripts -->
<script src="js/demo/datatables-demo.js"></script>
<!--6.引入Layer框架的JS-->
<script src="layer/layer/layer.js"></script>
</body>

</html>
